(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "react", "./virtual-mobile", "json!websiteConfig"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    const React = require("react");
    const virtual_mobile_1 = require("./virtual-mobile");
    const json_websiteConfig_1 = require("json!websiteConfig");
    requirejs({ context: json_websiteConfig_1.contextName }, ['less!controls/mobile-page-display']);
    class MobilePageDisplay extends React.Component {
        constructor(props) {
            super(props);
            this.state = { color: this.props.color };
            // this.styleColor = this.props.color;
        }
        changeStyle(style) {
            this.styleColor = style;
            this.setState({ color: style });
        }
        render() {
            let { scale, displayMobile } = this.props;
            let { color } = this.state;
            displayMobile = displayMobile == null ? true : displayMobile;
            return React.createElement(virtual_mobile_1.VirtualMobile, { color: color, scale: scale, displayMobile: displayMobile, ref: (e) => this.virtualMobile = e || this.virtualMobile });
        }
    }
    exports.MobilePageDisplay = MobilePageDisplay;
});
